package com.wayne.beans;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.http.HttpMethod;
import reactor.core.publisher.Mono;

import java.util.Map;

/**
 * 方法调用信息类
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class MethodInfo {
    /**
     * 方法路径
     */
    private String url;
    /**
     * 方法类型
     */
    private HttpMethod method;
    /**
     * 方法参数(url)
     */
    private Map<String, Object> params;
    /**
     * 请求体
     */
    private Mono<?> body;

    /**
     * 请求体类型
     */
    private Class<?> bodyElementType;

    /**
     * 判断是flux还是mono
     */
    private boolean returnFlux;

    /**
     * 返回对象类型
     */
    private Class<?> returnElementType;

}
